package com.xxmw.transaction.listener;

import com.xxmw.transaction.service.app.SymbolService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;

/**
 * 启动之后缓存个交易对当天0点
 * @author luowenliang
 * @since 2020/5/14 11:20
 */
public class StartupListener implements ApplicationListener<ContextRefreshedEvent> {

    @Autowired
    private SymbolService symbolService;

    @Override
    public void onApplicationEvent(ContextRefreshedEvent contextRefreshedEvent) {
        symbolService.cacheSymbolDayOpenPrice();
    }
}
